import request from '@/utils/request'

//查询用户列表
export function getUserList(data) {
	return request({
		method: 'get',
		url: 'tbSysUser/queryPageList',
		headers: {
			userButton: '14875431e22c4fefb05611b6525ce2dd'
		},
		params: data,
	})
}

//添加用户
export function addedUser(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/add',
		headers: {
			userButton: 'ba9896fc77074fcead8b591273a84bf6'
		},
		data,
	})
}

//删除用户
export function deleteUser(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/delete',
		headers: {
			userButton: 'b8973a58d6894b89ae84682994f0bb49'
		},
		data,
	})
}

//修改用户
export function updateUser(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/update',
		headers: {
			userButton: 'e5c5760c55c14cbe93bd5b4b9b2fb6ce'
		},
		data,
	})
}

//个人信息修改
export function updateUserBase(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/updateBase',
		headers: {
			userButton: 'f8c9cfd3ce0048c68decbcaf58c005b6'
		},
		data,
	})
}

//用户详情
export function userDetail(id) {
	return request({
		method: 'get',
		url: '/tbSysUser/queryById/' + id,
		headers: {
			userButton: '4353ad3a2e2e4efb83bc0dcc23366d72'
		},
	})
}

//审核用户
export function auditUser(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/audit',
		headers: {
			userButton: '89e66f5fb0414ca1b632e288848899e4'
		},
		data,
	})
}

//封禁/恢复用户
export function banAndRecoveryUser(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/banAndRecovery',
		headers: {
			userButton: '9bb78dfd86374296a4cd25d9f8cb0d8a'
		},
		data,
	})
}

//修改用户密码
export function updateUserPassword(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/updateAllPassword',
		headers: {
			userButton: 'f06173612e61423b87b9e990db85a73a'
		},
		data,
	})
}

//批量修改部门
export function batchUpdateDepart(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/batchUpdateDept',
		headers: {
			userButton: 'ba9896fc77074fcead8b591273a84bf6'
		},
		data,
	})
}

//开启/取消所有用户强制修改密码
export function forceUpdateAllUserPassword(isForce) {
	return request({
		method: 'post',
		url: 'tbSysUser/allForceUpdatePassword/' + isForce,
		headers: {
			userButton: '4d42454a662a4571a9c948f7de153460'
		},
	})
}

//修改是否强制修改密码
export function forceUpdateUserPassword(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/forceUpdatePassword',
		headers: {
			userButton: '8d9bb9c3bfdb4064826b7e84c1830032'
		},
		data,
	})
}

//批量修改用户的系统类型
export function batchUpdateUserType(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/updateBatchUserType',
		headers: {
			userButton: 'ba9896fc77074fcead8b591273a84bf6'
		},
		data,
	})
}

//设置用户图片
export function updateUserAvatar(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/updatePic',
		headers: {
			userButton: 'ba9896fc77074fcead8b591273a84bf6'
		},
		data,
	})
}

//修改密码 - 需要旧密码
export function updatePassNeedOld(data) {
	return request({
		method: 'post',
		url: 'tbSysUser/updatePassword',
		headers: {
			userButton: '38011b9d09a74431a6125e79ad4a52c5'
		},
		data,
	})
}